<%-- 
    Document   : homeAdmin
    Created on : 12/08/2013, 09:54:07
    Author     : Thiago
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
    <head>
        <title>SorriDent - O seu consultório odontológico em Florianópolis</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- Bootstrap -->
        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css">
        <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
        <link href="/Consultorio/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="/Consultorio/css/estilo.css" rel="stylesheet" media="screen">
        <link href="/Consultorio/css/bootstrap-glyphicons.css" rel="stylesheet" media="screen">

        <!-- JavaScript plugins (requires jQuery) -->
        <script src="http://code.jquery.com/jquery.js"></script>
        <!-- Include all compiled plugins (below), or include individual files as needed -->
        <script src="/Consultorio/js/bootstrap.min.js"></script>

        <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
        <script src="/Consultorio/js/respond.js"></script>
    </head>
    <body>
        <div class="container">
            <div id="header">
                <div class="navbar navbar-static-top navCon" style="float:left">
                    <a class="navbar-brand corTexto" href="#">SorriDent</a>
                    <ul class="nav navbar-nav">
                        <li><a href="/Consultorio/admin/perfilAdmin.jsp">Perfil</a></li>
                        <li class="bordaNav"><a href="/Consultorio/admin/consultaAdmin.jsp">Consultas</a></li>
                        <li><a href="/Consultorio/admin/agenda.jsp">Agenda</a></li>
                        <li><a href="/Consultorio/admin/examesAdmin.jsp">Exames</a></li>
                    </ul>
                </div>
                <div id="login">
                    <form method="POST" action="/Consultorio/ServletUsuario?cmd=sair">
                        <span class="input-group">Seja bem vindo(a)</span> <input class="btn btn-default" value="Sair" type="submit" style="padding: 0; width: 40px; float:right; margin-right: 35px; font-size: 12px; color:#428bca;" /> 
                    </form>
                </div>
            </div>   
        </div>
        <div class="container" style="margin-top: 40px">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <li class="dropdown tituloPainel" style="float:left; font-weight: bolder; font-size: 18px; margin-left:-35px">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="consultaAdmin.jsp">
                            Consultas <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="/Consultorio/admin/cadConsulta.jsp">Cadastrar</a></li>
                            <li ><a href="#">Relatórios</a></li>
                            <li ><a href="/Consultorio/admin/consultaAdmin.jsp">Pesquisar</a></li>
                        </ul>
                    </li>
                    <li class="dropdown tituloPainel">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            Prontuários <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="#">Pesquisar prontuários</a></li>
                            <li ><a href="#">Gerar receita</a></li>
                            <li ><a href="#">Gerar laudo</a></li>
                        </ul>
                    </li>
                    <li class="dropdown tituloPainel">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            Estoque materiais <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li ><a href="/Consultorio/admin/cadMateriais.jsp">Cadastrar</a></li>
                            <li ><a href="/Consultorio/admin/pesqMateriais.jsp">Pesquisar</a></li>
                        </ul>
                    </li>
                    <h3 class="tituloPainel"><a href="#">Fluxo de caixa</a></h3>
                </div>
                <div class="conteudo_admin">
                    <div class="input-group" style="width: 700px">
                        <input type="text" class="form-control" placeholder="Digite o nome do paciente para achar a consulta">
                        <span class="input-group-addon"><a href="#">Pesquisar</a></span>
                    </div>
                    <div class="container" style="margin-top: 30px">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Data</th>
                                    <th>Paciente</th>
                                    <th>Diagnostico</th>
                                    <th>Materiais utilizados</th>
                                    <th>Valor da consulta</th>
                                    <th>Alterar/Excluir</th>
                                </tr>
                            </thead>
                            <c:if test="${!empty consultas}">
                                <tbody id="corpoTabela">
                                <c:forEach var="con" items="${consultas}">
                                    <tr>
                                        <th>${con.id}</th>
                                        <th>${con.data}</th>
                                        <th>${con.paciente}</th>
                                        <th>${con.diagnostico}</th>
                                    <c:forEach var="materiais" items="${materiais}">
                                        <th>${materiais.nome}</th>
                                    </c:forEach>
                                    <th>${con.valorConsulta}</th>
                                    <th><a href="ServletFuncionario?cmd=pFuncionario&id=${func.id}" style="padding:10px"><i class="glyphicon glyphicon-wrench"></i>Alterar</a><a href="ServletFuncionario?cmd=excluir&id=${func.id}" onclick="return confirm('Tem certeza que deseja excluir?')" style="padding:10px; color:red"><i class="glyphicon glyphicon-remove-circle"></i>Excluir</a></th>
                                    </tr>
                                </c:forEach>
                                </tbody>
                            </c:if>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </body>
</html>
